题目链接：https://www.nowcoder.com/practice/b1f7a77416194fd3abd63737cdfcf82b?tpId=69&&tqId=29669&rp=1&ru=/activity/oj&qru=/ta/hust-kaoyan/question-ranking

#include<iostream>
using namespace std;
const int N = 13;
int arr[N] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
int  main()
{
    int y, m;
    while(cin >> y >> m)
    {
        if((y % 4 == 0 && y % 100 != 0) || y % 400 == 0) arr[2] += 1;  //润年
        int i = 0;
        for( i = 1; i <= 12; i++ )
        {
              if(m > arr[i]) m -= arr[i];  //当前天减去当前月份天数
              else break;  //相等或者小于的情况
        }
        printf("%4d-%02d-%02d\n", y,i,m) ;  //大于年、月、天
    }
    
    return 0;
}
